package com.web44.springboot.service;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;

/**
 * @Title: ScheduledService
 * @Description:
 * @Auther: py
 * @Version: 1.0
 * @create 2024/3/4 11:33
 */
@Service
public class ScheduledService {

    private static  int count = 1;


    // @Scheduled(cron="0/2 * * * * ? ")
    @Scheduled(cron="* 43 11 * * ? ")
    public void scheduled() {
        System.out.println("count的当前值是:"+count);
        count++;

    }
}
